
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreProductVirtualRequest struct {

	ProductId string `json:"product_id" form:"product_id"`

	AttrUnique string `json:"attr_unique" form:"attr_unique"`

	CardNo string `json:"card_no" form:"card_no"`

	CardPwd string `json:"card_pwd" form:"card_pwd"`

	CardUnique string `json:"card_unique" form:"card_unique"`

	OrderId string `json:"order_id" form:"order_id"`

	Uid string `json:"uid" form:"uid"`

}

func (r *StoreProductVirtualRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreProductVirtualRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"product_id": "required",

		"attr_unique": "required",

		"card_no": "required",

		"card_pwd": "required",

		"card_unique": "required",

		"order_id": "required",

		"uid": "required",

	}
}

func (r *StoreProductVirtualRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductVirtualRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreProductVirtualRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
